package controllers

import akka.actor.ActorSystem
import javax.inject._
import play.api.Logging
import play.api.mvc._

import scala.concurrent.{ExecutionContext, Future}

case class Parameters(parameters: String)

@Singleton
class WebApiController @Inject()(
                                  cc: ControllerComponents,
                                  actorSystem: ActorSystem,
                                  kdWebApi: KingdeeWebApi
                             )(implicit exec: ExecutionContext)
  extends AbstractController(cc)
    with Logging {
  //implicit val myCustomCharset = Codec.javaSupported("gb18030")
  def index = kdWebApi.index

  def show(page: String) = kdWebApi.show(page)

  def webApi(apiUrl: String) = kdWebApi.webApi(apiUrl)

}
